package Event;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import Animalmanagement.Animal;
import Animalmanagement.AnimalManagement;

public class EventCalendar extends Calendar {

	String background = "src/source/image/calendar.png";
	AnimalManagement animal;

	Showevent monkeyshow, bearshow, fursealshow, lionshow, elephantshow;

	public EventCalendar(AnimalManagement animal) {
		super();
		this.animal = animal;
		btnAction();
	}

	@Override
	public void btnAction() {

		btnmonkey1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				monkeyshow = new Showevent(animal
						.SearchingAnimal("Squirrel Monkey"));
				monkeyshow.setVisible(true);
				monkeyshow.setLocationRelativeTo(null);
			}

		});

		btnmonkey2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				monkeyshow = new Showevent(animal
						.SearchingAnimal("Squirrel Monkey"));
				monkeyshow.setVisible(true);
				monkeyshow.setLocationRelativeTo(null);

			}
		});
		btnele1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				elephantshow = new Showevent(animal.SearchingAnimal("elephant"));
				elephantshow.setVisible(true);
				elephantshow.setLocationRelativeTo(null);

			}
		});

		btnele2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				elephantshow = new Showevent(animal.SearchingAnimal("elephant"));
				elephantshow.setVisible(true);
				elephantshow.setLocationRelativeTo(null);
			}
		});

		btnlion1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				lionshow = new Showevent(animal.SearchingAnimal("lion"));
				lionshow.setVisible(true);
				lionshow.setLocationRelativeTo(null);
			}
		});

		btnlion2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				lionshow = new Showevent(animal.SearchingAnimal("lion"));
				lionshow.setVisible(true);
				lionshow.setLocationRelativeTo(null);
			}
		});

		btnseal1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				fursealshow = new Showevent(animal.SearchingAnimal("furseal"));
				fursealshow.setVisible(true);
				fursealshow.setLocationRelativeTo(null);
			}
		});

		btnseal2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				fursealshow = new Showevent(animal.SearchingAnimal("furseal"));
				fursealshow.setVisible(true);
				fursealshow.setLocationRelativeTo(null);
			}
		});
		btnbear1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				bearshow = new Showevent(animal.SearchingAnimal("bear"));
				bearshow.setVisible(true);
				bearshow.setLocationRelativeTo(null);
			}
		});

		btnbear2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				bearshow = new Showevent(animal.SearchingAnimal("bear"));
				bearshow.setVisible(true);
				bearshow.setLocationRelativeTo(null);
			}
		});

		homebtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
			}
		});

	}
}